package academicSup;

import java.util.Collection;

import javax.ejb.EJBLocalObject;

import query.Query;

import user.User;

import company.Company;
import department.Department;
import descriptor.AcademicSupDescriptor;

/**
 * AcademicSup
 *
 * The interface AcademicSup defines fields and methods on the object in the database
 * corresponding to informations about an Academic Supervisor
 * 
 */
public interface AcademicSup extends EJBLocalObject {
	
	// <ATTRIBUTES>
	
	// simple attributes
	/**
	 * getId
	 * 
	 * Returns the identification number of this Academic Supervisor in the workplacement system.
	 */
	public int getId();
	
	/**
	 * setId
	 * 
	 * Sets the identification number of the Academic Supervisor in the workplacement system.
	 * 
	 * Note : - It should only be used by the EJB manager ( Jonas ).
	 * 
	 * @param id : the identification number to set.
	 */
	public void setId(int id);
	
	/**
	 * getLogin
	 * 
	 * Returns the login of this Academic Supervisor to log in the workplacement system.
	 */
	public String getLogin();
	
	
	/**
	 * setLogin
	 * 
	 * Sets the login of this Academic Supervisor to log in the workplacement system.
	 * 
	 * @param login : the login to set.
	 */
	public void setLogin(String login);
	
	/**
	 * getPassword
	 * 
	 * Returns the password of this Academic Supervisor to log in the workplacement system.
	 * 
	 * Note : - The password is hashed using md5 algorithm.
	 */
	public String getPassword();
	
	/**
	 * setPassword
	 * 
	 * Sets the password of this Academic Supervisor to log in the workplacement system.
	 * 
	 * Note : - The password whould be hashed using md5 algorithm.
	 * 
	 * @param password : the hashed value of the password ( using md5 algorithm )
	 */
	public void setPassword(String password);
	
	/**
	 * getFirstname
	 * 
	 * Return the first name of this Academic Supervisor.
	 */
	public String getFirstname();
	
	/**
	 * setFirstname
	 * 
	 * Sets the first name of this Academic Supervisor.
	 * 
	 * @param firstname : the firstname to set.
	 */
	public void setFirstname(String firstname);
	
	/**
	 * getSurname
	 * 
	 * Returns the surname of this Academic Supervisor.
	 */
	public String getSurname();
	
	/**
	 * setSurname
	 * 
	 * Sets the surname of this Academic Supervisor.
	 * 
	 * @param surname : the surname to set.
	 */
	public void setSurname(String surname);
	
	/**
	 * getEmail
	 * 
	 * Returns the email of this Academic Supervisor.
	 */
	public String getEmail();
	
	/**
	 * setEmail
	 * 
	 * Sets the email of this Academic Supervisor.
	 * 
	 * @param email: the email to set.
	 */
	public void setEmail(String email);
	
	// Bean attributes
	// relations 1-1
	/**
	 * getUser
	 * @return retun the user bean corresponding to this bean
	 */
	public User getUser();
	
	
	/**
	 * setUser
	 * Set the UserBean corresponding to this user
	 * @param user : the User Bean
	 */
	public void setUser(User user);
	
	
	/**
	 * Return the deparment of the Academic Supervisor
	 * @return The departement
	 */
	public Department getDepartment();
	
	/**
	 * set the department of the Academic Supervisor
	 * @param dep : the department to set
	 */
	public void setDepartment(Department dep);
	
	// relation 1-many
	
	
	/**
	 * getQueries.
	 * return all the queries made by student for having this Academic Supervisor as thier own academic supervisor 
	 * @return all the queries made by student
	 */
	public Collection getQueries();
	
	
	/**
	 * SetQueries.
	 * Set the queries made by student having this Academic Supervisor as thier own academic supervisor 
	 * @param query : the set of Queries 
	 */
	public void setQueries(Collection query);
	
	/**
	 * getStudents.
	 * Seturn the students having this academicSupervisor as their own academic supervisor
	 * 
	 * @return the Colletion of Student
	 */
	public Collection getStudents();
	
	
	/**
	 * setStudents.
	 * Set the students having this academicSupervisor as their own academic supervisor
	 * @param students : the collection of student to set
	 */
	public void setStudents(Collection students);

	
	// </ATTRIBUTES>
	
	
	/**
	 * getDegrees.
	 * Return all the degree in the system
	 * @return A collection with the degrees
	 */
	public Collection getDegrees();
	
	
	/**
	 * accepteQuery.
	 * Accepte a query made a student. So its set the AcademicSupervisor of the student and change the status of the offer to "Accepted"
	 * @param query : the query to accepte
	 */
	public void acceptQuery(Query query);
	
	
	/**
	 * rejectQuery.
	 * Reject a query made a student. Change the status of the offer to "Refused"
	 * @param query : the query to refuse
	 */
	public void rejectQuery(Query query);
	
	/**
	 * getDescriptor.
	 * Return a descriptor which correspond to this user
	 * @return the descriptor
	 */
	public AcademicSupDescriptor getDescriptor();
}
